package org.lq.his.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.aspectj.internal.lang.annotation.ajcDeclareAnnotation;
import org.lq.his.dao.AllergyDao;
import org.lq.his.pojo.Allergy;
import org.lq.his.service.AllergyService;
import org.springframework.stereotype.Service;

@Service("allergyService")
public class AllergyServiceImpl implements AllergyService{

	@Resource
	private AllergyDao allergyDao;
	
	public void setAllergyDao(AllergyDao allergyDao) {
		this.allergyDao = allergyDao;
	}

	//查询所有过敏史
	@Override
	public List<Allergy> getAll() {
		
		return allergyDao.getAll();
	}
	
	//分页查询所有过敏史
	@Override
	public List<Allergy> getListByCondition(int start, int limit, Allergy condition, String column, String orderBy) {
		
		return allergyDao.getListByCondition(start, limit, condition, column, orderBy);
	}
	
	//查询分页条数
	@Override
	public Integer getCountByCondition(Allergy condition) {
		
		return allergyDao.getCountByCondition(condition);
	}

	//添加过敏史
	@Override
	public void add(Allergy allergy) {

		allergyDao.add(allergy);
	}
	
	//修改过敏史
	@Override
	public void update(Allergy allergy) {
		
		allergyDao.update(allergy);
	}

	//根据id查询
	@Override
	public Allergy getById(Integer id) {

		return allergyDao.getById(id);
	}

	//修改过敏史状态
	@Override
	public void deleteByIds(Integer[] ids) {
		
		allergyDao.deleteByIds(ids);
	}

}
